#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    double eps;
    scanf("%lf", &eps);
    double sum = 1;
    int i = 0;
    double fact = 1;
    for (i = 1; 1 / fact >= eps; i++)
    {
        fact *= i;
        sum += 1 / fact;
    }
    printf("e=%.3f\ncount=%d", sum, i - 1);
    return 0;
}